/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ccpvMainPanel.java
 *
 * Created on Apr 28, 2009, 12:34:59 PM
 */
package ccpv;

import DragBarPanelPackage.*;
import java.awt.Color;
import java.awt.Dimension;
import java.util.List;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author Evan
 */
public class CCPVMainPanel extends javax.swing.JPanel
{

  /** Creates new form ccpvMainPanel */
  public CCPVMainPanel()
  {
    initComponents();
    // setup coalition rules dialog
    coalitionRulesButtonGroup.add(coalitionRulesAdditionOption);
    coalitionRulesButtonGroup.add(coalitionRulesMultiplicationOption);
    // setup the drag bar panel
    dragBarContainer.setSize(490, 440);
    theDragBarPanel.setSize(dragBarContainer.getSize());
    Dimension size = dragBarContainer.getSize();
    System.out.println("container: " + size.toString());
    System.out.println("dragBar: " + size.toString());
    dragBarContainer.add(theDragBarPanel);
    setupTreeListeners();
  }

  public void setupTreeListeners()
  {
    // setup tree listeners for altruism dialog
    getGroupAltruismSourceTree().addTreeSelectionListener(new TreeSelectionListener()
    {

      public void valueChanged(TreeSelectionEvent e)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) getGroupAltruismSourceTree().getLastSelectedPathComponent();

        /* if nothing is selected */
        if (node == null)
        {
          return;
        }

        /* retrieve the node that was selected */
        Object nodeInfo = node.getUserObject();

        /* React to the node selection. */
        if (node.isLeaf())
        {
          getGroupAltruismTitle().setForeground(Color.BLUE);
          getGroupAltruismTitle().setText((String) nodeInfo);
          getTheDragBarPanel().repaint();
        }
      }
    });

    getGroupAltruismTargetTree().addTreeSelectionListener(new TreeSelectionListener()
    {

      public void valueChanged(TreeSelectionEvent e)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) getGroupAltruismTargetTree().getLastSelectedPathComponent();

        /* if nothing is selected */
        if (node == null)
        {
          return;
        }

        /* retrieve the node that was selected */
        Object nodeInfo = node.getUserObject();

        /* React to the node selection. */
        // create buttons if there are children.
        if (!node.isLeaf())
        {
          System.out.println("I'M CALLED!");
          int numChildren = node.getChildCount();
          //theDragBarPanel = new DragBarPanel(numChildren);
          Vector<DragBarButton> theButtons = getTheDragBarPanel().getButtons();

          for (int i = 0; i < theButtons.size(); i++)
          {
            DefaultMutableTreeNode child = (DefaultMutableTreeNode) node.getChildAt(i);
            JButton currentB = theButtons.get(i);
            currentB.setName((String) child.getUserObject());
            currentB.setText(currentB.getName() + ": " + getTheDragBarPanel().calculateScaledValue(currentB));
          }

          getTheDragBarPanel().updateUI();
        }
      }
    });

    setupGroupSelectionTreeListeners();
  }

  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">
  private void initComponents() {

    createCoalitionDialog = new javax.swing.JDialog();
    jPanel3 = new javax.swing.JPanel();
    coalCreationRemoveCharacteristicButton = new javax.swing.JButton();
    coalCreationNextCoalButton = new javax.swing.JButton();
    jTextField2 = new javax.swing.JTextField();
    coalCreationConfirmCoalitionButton = new javax.swing.JButton();
    jLabel7 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jScrollPane6 = new javax.swing.JScrollPane();
    coalitionCreationGroupPane = new javax.swing.JTextPane();
    jScrollPane7 = new javax.swing.JScrollPane();
    coalitionCreationOthersPane = new javax.swing.JTextPane();
    jScrollPane4 = new javax.swing.JScrollPane();
    coalitionCreationCoalitionPane = new javax.swing.JTextPane();
    jLabel4 = new javax.swing.JLabel();
    coalCreationConfirmGroupButton = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    coalCreationPrevCoalButton = new javax.swing.JButton();
    coalitionCreationSelectedAscriptivePane = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    coalitionCreationAscriptiveTree = new javax.swing.JTree();
    jLabel8 = new javax.swing.JLabel();
    coalCreationResetGroupButton = new javax.swing.JButton();
    coalCreationConfirmCharacteristicButton = new javax.swing.JButton();
    coalCreationResetCoalitionButton = new javax.swing.JButton();
    jScrollPane5 = new javax.swing.JScrollPane();
    coalitionCreationDetailsPane = new javax.swing.JTextPane();
    coalCreationRemoveGroupButton = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    optionsDialog = new javax.swing.JDialog();
    optionsDialogPane = new javax.swing.JPanel();
    viewAndChangeAltruismButton = new javax.swing.JButton();
    viewAscriptiveTreeButton = new javax.swing.JButton();
    viewGroupDetailsButton = new javax.swing.JButton();
    jLabel10 = new javax.swing.JLabel();
    setCoalitionRulesButton = new javax.swing.JButton();
    groupDetailsDialog = new javax.swing.JDialog();
    groupDetailsPanel = new javax.swing.JPanel();
    jLabel11 = new javax.swing.JLabel();
    jScrollPane9 = new javax.swing.JScrollPane();
    groupDetailsSelectedGroupPane = new javax.swing.JTextPane();
    groupDetailsRemoveCharacteristicButton = new javax.swing.JButton();
    jLabel14 = new javax.swing.JLabel();
    groupDetailsResetGroupButton = new javax.swing.JButton();
    groupDetailsSelectedAscriptivePane = new javax.swing.JTextField();
    jLabel13 = new javax.swing.JLabel();
    jScrollPane8 = new javax.swing.JScrollPane();
    groupDetailsAscriptiveTree = new javax.swing.JTree();
    jLabel12 = new javax.swing.JLabel();
    jScrollPane10 = new javax.swing.JScrollPane();
    groupDetailsGroupPane = new javax.swing.JTextPane();
    groupDetailsConfirmCharacteristicButton = new javax.swing.JButton();
    jLabel15 = new javax.swing.JLabel();
    groupDetailsConfirmGroupButton = new javax.swing.JButton();
    ascriptiveTreeDialog = new javax.swing.JDialog();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane11 = new javax.swing.JScrollPane();
    ascriptiveTree = new javax.swing.JTree();
    jLabel16 = new javax.swing.JLabel();
    altruismDialog = new javax.swing.JDialog();
    jLabel17 = new javax.swing.JLabel();
    jLabel18 = new javax.swing.JLabel();
    groupAltruismDoneButton = new javax.swing.JButton();
    groupAltruismResetButton = new javax.swing.JButton();
    jScrollPane12 = new javax.swing.JScrollPane();
    groupAltruismSourceTree = new javax.swing.JTree();
    jScrollPane13 = new javax.swing.JScrollPane();
    groupAltruismTargetTree = new javax.swing.JTree();
    dragBarContainer = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    groupAltruismTitle = new javax.swing.JLabel();
    jLabel21 = new javax.swing.JLabel();
    yAxisScaleInputText = new javax.swing.JTextField();
    yAxisScaleOKButton = new javax.swing.JButton();
    coalitionRulesDialog = new javax.swing.JDialog();
    jPanel4 = new javax.swing.JPanel();
    jLabel19 = new javax.swing.JLabel();
    jLabel20 = new javax.swing.JLabel();
    coalitionRulesOKButton = new javax.swing.JButton();
    coalitionRulesAdditionOption = new javax.swing.JRadioButton();
    coalitionRulesMultiplicationOption = new javax.swing.JRadioButton();
    coalitionRulesButtonGroup = new javax.swing.ButtonGroup();
    previousYearButton = new javax.swing.JButton();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jScrollPane2 = new javax.swing.JScrollPane();
    coalitionTree = new javax.swing.JTree();
    jScrollPane1 = new javax.swing.JScrollPane();
    coalitionTextPane = new javax.swing.JTextPane();
    dataFileNameLabel = new javax.swing.JLabel();
    previousCoalitionButton = new javax.swing.JButton();
    nextCoalitionButton = new javax.swing.JButton();
    nextYearButton = new javax.swing.JButton();
    loadDataButton = new javax.swing.JButton();
    optionsButton = new javax.swing.JButton();
    createCoalitionButton = new javax.swing.JButton();

    createCoalitionDialog.setBackground(new java.awt.Color(204, 255, 255));
    createCoalitionDialog.setForeground(new java.awt.Color(204, 255, 255));
    createCoalitionDialog.setMinimumSize(new java.awt.Dimension(670, 663));

    jPanel3.setBackground(new java.awt.Color(242, 255, 255));

    coalCreationRemoveCharacteristicButton.setText("Remove Characteristic");

    coalCreationNextCoalButton.setText("Next >>");

    jTextField2.setText("Enter group number for removal");

    coalCreationConfirmCoalitionButton.setText("Confirm Coalition");

    jLabel7.setFont(new java.awt.Font("Tahoma", 3, 11));
    jLabel7.setText("Selected Ascriptive Characteristic");

    jLabel5.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel5.setText("Group Removal");

    jLabel3.setFont(new java.awt.Font("Tahoma", 3, 14));
    jLabel3.setText("Selected Coalition");

    jScrollPane6.setViewportView(coalitionCreationGroupPane);

    jScrollPane7.setViewportView(coalitionCreationOthersPane);

    coalitionCreationCoalitionPane.setEditable(false);
    jScrollPane4.setViewportView(coalitionCreationCoalitionPane);

    jLabel4.setFont(new java.awt.Font("Tahoma", 3, 14));
    jLabel4.setText("Coalition Details");

    coalCreationConfirmGroupButton.setText("Confirm Group");

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel1.setText("Coalition Creation");

    jLabel9.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel9.setText("Other Coalitions");

    coalCreationPrevCoalButton.setText("<< Previous");
    coalCreationPrevCoalButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        coalCreationPrevCoalButtonActionPerformed(evt);
      }
    });

    coalitionCreationSelectedAscriptivePane.setEditable(false);
    coalitionCreationSelectedAscriptivePane.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N

    jLabel6.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel6.setText("Selected Group");

    jScrollPane3.setViewportView(coalitionCreationAscriptiveTree);

    jLabel8.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel8.setText("Coalition Confirmation");

    coalCreationResetGroupButton.setText("Reset Group");

    coalCreationConfirmCharacteristicButton.setText("Confirm Characteristic");
    coalCreationConfirmCharacteristicButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        coalCreationConfirmCharacteristicButtonActionPerformed(evt);
      }
    });

    coalCreationResetCoalitionButton.setText("Reset Coalition");

    coalitionCreationDetailsPane.setEditable(false);
    jScrollPane5.setViewportView(coalitionCreationDetailsPane);

    coalCreationRemoveGroupButton.setText("Remove Group");

    jLabel2.setFont(new java.awt.Font("Tahoma", 3, 14));
    jLabel2.setText("Ascriptive Tree");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
      jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel3Layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(jPanel3Layout.createSequentialGroup()
            .addGap(210, 210, 210)
            .addComponent(jLabel1))
          .addGroup(jPanel3Layout.createSequentialGroup()
            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(110, 110, 110)
            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(80, 80, 80)
            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
            .addGroup(jPanel3Layout.createSequentialGroup()
              .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(110, 110, 110)
              .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(10, 10, 10)
              .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel3Layout.createSequentialGroup()
              .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(coalCreationConfirmGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
              .addGap(10, 10, 10)
              .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(coalCreationRemoveGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(coalCreationConfirmCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
              .addGap(10, 10, 10)
              .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel3Layout.createSequentialGroup()
              .addComponent(coalCreationResetGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(10, 10, 10)
              .addComponent(coalCreationResetCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(10, 10, 10)
              .addComponent(coalCreationPrevCoalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(10, 10, 10)
              .addComponent(coalCreationNextCoalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel3Layout.createSequentialGroup()
              .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(coalCreationConfirmCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(coalCreationRemoveCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(coalitionCreationSelectedAscriptivePane, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
              .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
              .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
              .addComponent(jScrollPane5))))
        .addContainerGap())
    );
    jPanel3Layout.setVerticalGroup(
      jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel3Layout.createSequentialGroup()
        .addContainerGap()
        .addComponent(jLabel1)
        .addGap(11, 11, 11)
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jLabel2)
          .addComponent(jLabel3)
          .addComponent(jLabel4))
        .addGap(3, 3, 3)
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(jPanel3Layout.createSequentialGroup()
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2, Short.MAX_VALUE)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jLabel7)
            .addGap(6, 6, 6)
            .addComponent(coalitionCreationSelectedAscriptivePane, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(coalCreationConfirmCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(coalCreationRemoveCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(20, 20, 20))
          .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
              .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
              .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE))
            .addGap(18, 18, 18)))
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jLabel6)
          .addComponent(jLabel5)
          .addComponent(jLabel9))
        .addGap(5, 5, 5)
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(jPanel3Layout.createSequentialGroup()
            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(coalCreationConfirmGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(jPanel3Layout.createSequentialGroup()
            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(coalCreationRemoveGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(30, 30, 30)
            .addComponent(jLabel8)
            .addGap(5, 5, 5)
            .addComponent(coalCreationConfirmCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(coalCreationResetGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(coalCreationResetCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(coalCreationPrevCoalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(coalCreationNextCoalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addContainerGap())
    );

    javax.swing.GroupLayout createCoalitionDialogLayout = new javax.swing.GroupLayout(createCoalitionDialog.getContentPane());
    createCoalitionDialog.getContentPane().setLayout(createCoalitionDialogLayout);
    createCoalitionDialogLayout.setHorizontalGroup(
      createCoalitionDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    createCoalitionDialogLayout.setVerticalGroup(
      createCoalitionDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    optionsDialog.setBackground(new java.awt.Color(204, 255, 204));
    optionsDialog.setForeground(new java.awt.Color(255, 204, 204));
    optionsDialog.setMinimumSize(new java.awt.Dimension(288, 312));

    optionsDialogPane.setBackground(new java.awt.Color(204, 255, 255));
    optionsDialogPane.setMinimumSize(new java.awt.Dimension(288, 201));

    viewAndChangeAltruismButton.setText("View or Change Group Altruism Values");
    viewAndChangeAltruismButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        viewAndChangeAltruismButtonActionPerformed(evt);
      }
    });

    viewAscriptiveTreeButton.setText("View Ascriptive Characteristics Tree");
    viewAscriptiveTreeButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        viewAscriptiveTreeButtonActionPerformed(evt);
      }
    });

    viewGroupDetailsButton.setText("View Group Details");
    viewGroupDetailsButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        viewGroupDetailsButtonActionPerformed(evt);
      }
    });

    jLabel10.setFont(new java.awt.Font("Tahoma", 3, 18));
    jLabel10.setText("Options");

    setCoalitionRulesButton.setText("Set Coalition Rules");
    setCoalitionRulesButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        setCoalitionRulesButtonActionPerformed(evt);
      }
    });

    javax.swing.GroupLayout optionsDialogPaneLayout = new javax.swing.GroupLayout(optionsDialogPane);
    optionsDialogPane.setLayout(optionsDialogPaneLayout);
    optionsDialogPaneLayout.setHorizontalGroup(
      optionsDialogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(optionsDialogPaneLayout.createSequentialGroup()
        .addContainerGap()
        .addGroup(optionsDialogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
          .addComponent(viewGroupDetailsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(viewAscriptiveTreeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(viewAndChangeAltruismButton, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(setCoalitionRulesButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addGroup(optionsDialogPaneLayout.createSequentialGroup()
            .addGap(99, 99, 99)
            .addComponent(jLabel10)))
        .addContainerGap())
    );
    optionsDialogPaneLayout.setVerticalGroup(
      optionsDialogPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(optionsDialogPaneLayout.createSequentialGroup()
        .addContainerGap()
        .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(viewGroupDetailsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(viewAscriptiveTreeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(viewAndChangeAltruismButton, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(setCoalitionRulesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );

    javax.swing.GroupLayout optionsDialogLayout = new javax.swing.GroupLayout(optionsDialog.getContentPane());
    optionsDialog.getContentPane().setLayout(optionsDialogLayout);
    optionsDialogLayout.setHorizontalGroup(
      optionsDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(optionsDialogPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    optionsDialogLayout.setVerticalGroup(
      optionsDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(optionsDialogPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    groupDetailsDialog.setMinimumSize(new java.awt.Dimension(500, 630));

    groupDetailsPanel.setBackground(new java.awt.Color(255, 232, 232));
    groupDetailsPanel.setMinimumSize(new java.awt.Dimension(451, 599));
    groupDetailsPanel.setPreferredSize(new java.awt.Dimension(451, 599));

    jLabel11.setFont(new java.awt.Font("Tahoma", 1, 18));
    jLabel11.setText("Group Details");

    jScrollPane9.setViewportView(groupDetailsSelectedGroupPane);

    groupDetailsRemoveCharacteristicButton.setText("RemoveCharacteristic");

    jLabel14.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel14.setText("Selected Group");

    groupDetailsResetGroupButton.setText("Reset Group");

    groupDetailsSelectedAscriptivePane.setEditable(false);
    groupDetailsSelectedAscriptivePane.setFont(new java.awt.Font("Tahoma", 1, 11));

    jLabel13.setFont(new java.awt.Font("Tahoma", 3, 11));
    jLabel13.setText("Selected Ascriptive Characteristic");

    jScrollPane8.setViewportView(groupDetailsAscriptiveTree);

    jLabel12.setFont(new java.awt.Font("Tahoma", 3, 14));
    jLabel12.setText("Ascriptive Tree");

    jScrollPane10.setViewportView(groupDetailsGroupPane);

    groupDetailsConfirmCharacteristicButton.setText("Confirm Characteristic");
    groupDetailsConfirmCharacteristicButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        groupDetailsConfirmCharacteristicButtonActionPerformed(evt);
      }
    });

    jLabel15.setFont(new java.awt.Font("Tahoma", 3, 14));
    jLabel15.setText("Group Details");

    groupDetailsConfirmGroupButton.setText("Confirm Group");

    javax.swing.GroupLayout groupDetailsPanelLayout = new javax.swing.GroupLayout(groupDetailsPanel);
    groupDetailsPanel.setLayout(groupDetailsPanelLayout);
    groupDetailsPanelLayout.setHorizontalGroup(
      groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(groupDetailsPanelLayout.createSequentialGroup()
        .addContainerGap()
        .addGroup(groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
          .addGroup(groupDetailsPanelLayout.createSequentialGroup()
            .addGroup(groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(groupDetailsSelectedAscriptivePane, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(groupDetailsConfirmCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(groupDetailsRemoveCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGroup(groupDetailsPanelLayout.createSequentialGroup()
                .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(100, 100, 100))
              .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(groupDetailsConfirmGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(groupDetailsResetGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
              .addGroup(groupDetailsPanelLayout.createSequentialGroup()
                .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(104, 104, 104))
              .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)))
          .addGroup(groupDetailsPanelLayout.createSequentialGroup()
            .addGap(142, 142, 142)
            .addComponent(jLabel11)))
        .addContainerGap(11, Short.MAX_VALUE))
    );
    groupDetailsPanelLayout.setVerticalGroup(
      groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(groupDetailsPanelLayout.createSequentialGroup()
        .addContainerGap()
        .addComponent(jLabel11)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addGroup(groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(jLabel12)
          .addComponent(jLabel15))
        .addGap(3, 3, 3)
        .addGroup(groupDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
          .addGroup(groupDetailsPanelLayout.createSequentialGroup()
            .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jLabel13)
            .addGap(6, 6, 6)
            .addComponent(groupDetailsSelectedAscriptivePane, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(groupDetailsConfirmCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(groupDetailsRemoveCharacteristicButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(20, 20, 20)
            .addComponent(jLabel14)
            .addGap(5, 5, 5)
            .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(groupDetailsConfirmGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(groupDetailsResetGroupButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addComponent(jScrollPane10))
        .addContainerGap())
    );

    javax.swing.GroupLayout groupDetailsDialogLayout = new javax.swing.GroupLayout(groupDetailsDialog.getContentPane());
    groupDetailsDialog.getContentPane().setLayout(groupDetailsDialogLayout);
    groupDetailsDialogLayout.setHorizontalGroup(
      groupDetailsDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(groupDetailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    );
    groupDetailsDialogLayout.setVerticalGroup(
      groupDetailsDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(groupDetailsDialogLayout.createSequentialGroup()
        .addComponent(groupDetailsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );

    ascriptiveTreeDialog.setMinimumSize(new java.awt.Dimension(292, 388));

    jPanel2.setBackground(new java.awt.Color(204, 255, 204));

    jScrollPane11.setViewportView(ascriptiveTree);

    jLabel16.setFont(new java.awt.Font("Tahoma", 1, 14));
    jLabel16.setText("Ascriptive Tree");

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
      jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel2Layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jScrollPane11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addGroup(jPanel2Layout.createSequentialGroup()
            .addGap(80, 80, 80)
            .addComponent(jLabel16)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))
        .addContainerGap())
    );
    jPanel2Layout.setVerticalGroup(
      jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel2Layout.createSequentialGroup()
        .addContainerGap()
        .addComponent(jLabel16)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addContainerGap())
    );

    javax.swing.GroupLayout ascriptiveTreeDialogLayout = new javax.swing.GroupLayout(ascriptiveTreeDialog.getContentPane());
    ascriptiveTreeDialog.getContentPane().setLayout(ascriptiveTreeDialogLayout);
    ascriptiveTreeDialogLayout.setHorizontalGroup(
      ascriptiveTreeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 292, Short.MAX_VALUE)
    );
    ascriptiveTreeDialogLayout.setVerticalGroup(
      ascriptiveTreeDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    );

    altruismDialog.setBackground(new java.awt.Color(255, 204, 204));
    altruismDialog.setForeground(new java.awt.Color(204, 255, 204));
    altruismDialog.setMinimumSize(new java.awt.Dimension(660, 520));
    altruismDialog.getContentPane().setLayout(null);

    jLabel17.setFont(new java.awt.Font("Tahoma", 1, 14));
    jLabel17.setText("source");
    altruismDialog.getContentPane().add(jLabel17);
    jLabel17.setBounds(10, 10, 46, 17);

    jLabel18.setFont(new java.awt.Font("Tahoma", 1, 14));
    jLabel18.setText("target");
    altruismDialog.getContentPane().add(jLabel18);
    jLabel18.setBounds(10, 170, 43, 17);

    groupAltruismDoneButton.setText("DONE");
    groupAltruismDoneButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        groupAltruismDoneButtonActionPerformed(evt);
      }
    });
    altruismDialog.getContentPane().add(groupAltruismDoneButton);
    groupAltruismDoneButton.setBounds(10, 450, 130, 30);

    groupAltruismResetButton.setText("Reset");
    groupAltruismResetButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        groupAltruismResetButtonActionPerformed(evt);
      }
    });
    altruismDialog.getContentPane().add(groupAltruismResetButton);
    groupAltruismResetButton.setBounds(10, 420, 130, 30);

    jScrollPane12.setViewportView(groupAltruismSourceTree);

    altruismDialog.getContentPane().add(jScrollPane12);
    jScrollPane12.setBounds(10, 30, 130, 140);

    jScrollPane13.setViewportView(groupAltruismTargetTree);

    altruismDialog.getContentPane().add(jScrollPane13);
    jScrollPane13.setBounds(10, 190, 130, 140);

    dragBarContainer.setBackground(new java.awt.Color(204, 204, 255));
    dragBarContainer.setMinimumSize(new java.awt.Dimension(490, 440));
    dragBarContainer.setLayout(null);
    altruismDialog.getContentPane().add(dragBarContainer);
    dragBarContainer.setBounds(150, 40, 490, 440);

    jPanel1.setBackground(new java.awt.Color(255, 255, 255));

    groupAltruismTitle.setFont(new java.awt.Font("Tahoma", 1, 24));
    groupAltruismTitle.setText("Group Altruism");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
      jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
        .addGap(140, 140, 140)
        .addComponent(groupAltruismTitle)
        .addContainerGap(170, Short.MAX_VALUE))
    );
    jPanel1Layout.setVerticalGroup(
      jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
        .addComponent(groupAltruismTitle)
        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );

    altruismDialog.getContentPane().add(jPanel1);
    jPanel1.setBounds(150, 10, 490, 30);

    jLabel21.setFont(new java.awt.Font("Tahoma", 3, 12));
    jLabel21.setText("Y Axis Scale");
    altruismDialog.getContentPane().add(jLabel21);
    jLabel21.setBounds(10, 330, 71, 15);

    yAxisScaleInputText.setText("1.0");
    yAxisScaleInputText.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mouseEntered(java.awt.event.MouseEvent evt) {
        yAxisScaleInputTextMouseEntered(evt);
      }
    });
    altruismDialog.getContentPane().add(yAxisScaleInputText);
    yAxisScaleInputText.setBounds(10, 350, 130, 20);

    yAxisScaleOKButton.setText("Set Y Axis Scale");
    yAxisScaleOKButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        yAxisScaleOKButtonActionPerformed(evt);
      }
    });
    altruismDialog.getContentPane().add(yAxisScaleOKButton);
    yAxisScaleOKButton.setBounds(10, 370, 130, 30);

    coalitionRulesDialog.setMinimumSize(new java.awt.Dimension(207, 162));

    jPanel4.setBackground(new java.awt.Color(255, 255, 204));
    jPanel4.setMinimumSize(new java.awt.Dimension(207, 162));
    jPanel4.setLayout(null);

    jLabel19.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel19.setText("Coalition Rules");
    jPanel4.add(jLabel19);
    jLabel19.setBounds(10, 10, 180, 30);

    jLabel20.setFont(new java.awt.Font("Tahoma", 2, 12));
    jLabel20.setText("Altruism Aggregate Function");
    jPanel4.add(jLabel20);
    jLabel20.setBounds(10, 50, 160, 15);

    coalitionRulesOKButton.setText("OK");
    coalitionRulesOKButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        coalitionRulesOKButtonActionPerformed(evt);
      }
    });
    jPanel4.add(coalitionRulesOKButton);
    coalitionRulesOKButton.setBounds(10, 120, 190, 30);

    coalitionRulesAdditionOption.setBackground(new java.awt.Color(255, 255, 204));
    coalitionRulesAdditionOption.setFont(new java.awt.Font("Tahoma", 1, 11));
    coalitionRulesAdditionOption.setText("Addition");
    jPanel4.add(coalitionRulesAdditionOption);
    coalitionRulesAdditionOption.setBounds(10, 70, 100, 23);

    coalitionRulesMultiplicationOption.setBackground(new java.awt.Color(255, 255, 204));
    coalitionRulesMultiplicationOption.setFont(new java.awt.Font("Tahoma", 1, 11));
    coalitionRulesMultiplicationOption.setText("Multiplication");
    jPanel4.add(coalitionRulesMultiplicationOption);
    coalitionRulesMultiplicationOption.setBounds(10, 90, 110, 23);

    javax.swing.GroupLayout coalitionRulesDialogLayout = new javax.swing.GroupLayout(coalitionRulesDialog.getContentPane());
    coalitionRulesDialog.getContentPane().setLayout(coalitionRulesDialogLayout);
    coalitionRulesDialogLayout.setHorizontalGroup(
      coalitionRulesDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    coalitionRulesDialogLayout.setVerticalGroup(
      coalitionRulesDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    setBackground(new java.awt.Color(218, 221, 255));
    setMaximumSize(new java.awt.Dimension(526, 495));
    setMinimumSize(new java.awt.Dimension(526, 495));

    previousYearButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    previousYearButton.setText("<< See Previous Year's Coalitions <<");

    jScrollPane2.setViewportView(coalitionTree);

    jTabbedPane1.addTab("Tree View", jScrollPane2);

    jScrollPane1.setViewportView(coalitionTextPane);

    jTabbedPane1.addTab("Text View", jScrollPane1);

    dataFileNameLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    dataFileNameLabel.setText("File name of data will display here");

    previousCoalitionButton.setFont(new java.awt.Font("Tahoma", 1, 11));
    previousCoalitionButton.setText("<< See Previous Coalition <<");
    previousCoalitionButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        previousCoalitionButtonActionPerformed(evt);
      }
    });

    nextCoalitionButton.setFont(new java.awt.Font("Tahoma", 1, 11));
    nextCoalitionButton.setText(">> See Next Coalition >>");

    nextYearButton.setFont(new java.awt.Font("Tahoma", 1, 11));
    nextYearButton.setText(">> See Next Year's Coalitions >>");

    loadDataButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    loadDataButton.setText("Load Data");

    optionsButton.setFont(new java.awt.Font("Tahoma", 1, 11));
    optionsButton.setText("Options");
    optionsButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        optionsButtonActionPerformed(evt);
      }
    });

    createCoalitionButton.setFont(new java.awt.Font("Tahoma", 1, 11));
    createCoalitionButton.setText("Create A Coalition");
    createCoalitionButton.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        createCoalitionButtonActionPerformed(evt);
      }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(dataFileNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 506, Short.MAX_VALUE)
          .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 506, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addGroup(layout.createSequentialGroup()
            .addComponent(previousYearButton)
            .addGap(18, 18, 18)
            .addComponent(nextYearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(layout.createSequentialGroup()
            .addComponent(loadDataButton, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(optionsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
            .addComponent(createCoalitionButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
              .addComponent(previousCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)
              .addGap(18, 18, 18)
              .addComponent(nextCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))))
        .addContainerGap())
    );
    layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(optionsButton)
          .addComponent(loadDataButton))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(dataFileNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(previousYearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(nextYearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(previousCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(nextCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(createCoalitionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );
  }// </editor-fold>

    private void previousCoalitionButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                        
      // TODO add your handling code here:
    }                                                       

    private void createCoalitionButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                      
      // TODO add your handling code here:
      getCreateCoalitionDialog().setVisible(true);
}                                                     

    private void coalCreationConfirmCharacteristicButtonActionPerformed(java.awt.event.ActionEvent evt)
    {
      // TODO add your handling code here:
}

    private void coalCreationPrevCoalButtonActionPerformed(java.awt.event.ActionEvent evt)
    {
      // TODO add your handling code here:
}

    private void groupDetailsConfirmCharacteristicButtonActionPerformed(java.awt.event.ActionEvent evt)
    {
      // TODO add your handling code here:
}

    private void optionsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              
      // TODO add your handling code here:
      getOptionsDialog().setVisible(true);
      System.out.println("hey");
    }                                             

    private void viewAscriptiveTreeButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                         
      // TODO add your handling code here:
      getAscriptiveTreeDialog().setVisible(true);
    }                                                        

    private void viewGroupDetailsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                       
      // TODO add your handling code here:
      getGroupDetailsDialog().setVisible(true);
    }                                                      

    private void viewAndChangeAltruismButtonActionPerformed(java.awt.event.ActionEvent evt)                                                            
    {                                                                
      // TODO add your handling code here:
      getAltruismDialog().setVisible(true);
}                                                           

    private void groupAltruismResetButtonActionPerformed(java.awt.event.ActionEvent evt)                                                         
    {                                                             
      // TODO add your handling code here:
      theDragBarPanel.reset();
}                                                        

    private void yAxisScaleOKButtonActionPerformed(java.awt.event.ActionEvent evt)                                                   
    {                                                       
      // TODO add your handling code here:
      theDragBarPanel.setScale(Double.parseDouble(yAxisScaleInputText.getText()));
    }                                                  

    private void yAxisScaleInputTextMouseEntered(java.awt.event.MouseEvent evt)                                                 
    {                                                     
      // TODO add your handling code here:
      yAxisScaleInputText.setText("" + theDragBarPanel.getScale());
    }                                                

    private void groupAltruismDoneButtonActionPerformed(java.awt.event.ActionEvent evt)                                                        
    {                                                            
      // close the dialog
      altruismDialog.setVisible(false);
    // must do other things, of course
    }                                                       

    private void setCoalitionRulesButtonActionPerformed(java.awt.event.ActionEvent evt)                                                        
    {                                                            
      // TODO add your handling code here:
      coalitionRulesDialog.setVisible(true);
    }                                                       

    private void coalitionRulesOKButtonActionPerformed(java.awt.event.ActionEvent evt)                                                       
    {                                                           
      // TODO add your handling code here:
      coalitionRulesDialog.setVisible(false);
    }                                                      

  // Variables declaration - do not modify
  public javax.swing.JDialog altruismDialog;
  public javax.swing.JTree ascriptiveTree;
  public javax.swing.JDialog ascriptiveTreeDialog;
  public javax.swing.JButton coalCreationConfirmCharacteristicButton;
  public javax.swing.JButton coalCreationConfirmCoalitionButton;
  public javax.swing.JButton coalCreationConfirmGroupButton;
  public javax.swing.JButton coalCreationNextCoalButton;
  public javax.swing.JButton coalCreationPrevCoalButton;
  public javax.swing.JButton coalCreationRemoveCharacteristicButton;
  public javax.swing.JButton coalCreationRemoveGroupButton;
  public javax.swing.JButton coalCreationResetCoalitionButton;
  public javax.swing.JButton coalCreationResetGroupButton;
  public javax.swing.JTree coalitionCreationAscriptiveTree;
  public javax.swing.JTextPane coalitionCreationCoalitionPane;
  public javax.swing.JTextPane coalitionCreationDetailsPane;
  public javax.swing.JTextPane coalitionCreationGroupPane;
  public javax.swing.JTextPane coalitionCreationOthersPane;
  public javax.swing.JTextField coalitionCreationSelectedAscriptivePane;
  public javax.swing.JRadioButton coalitionRulesAdditionOption;
  public javax.swing.ButtonGroup coalitionRulesButtonGroup;
  public javax.swing.JDialog coalitionRulesDialog;
  public javax.swing.JRadioButton coalitionRulesMultiplicationOption;
  public javax.swing.JButton coalitionRulesOKButton;
  public javax.swing.JTextPane coalitionTextPane;
  public javax.swing.JTree coalitionTree;
  public javax.swing.JButton createCoalitionButton;
  public javax.swing.JDialog createCoalitionDialog;
  public javax.swing.JLabel dataFileNameLabel;
  public javax.swing.JPanel dragBarContainer;
  public javax.swing.JButton groupAltruismDoneButton;
  public javax.swing.JButton groupAltruismResetButton;
  public javax.swing.JTree groupAltruismSourceTree;
  public javax.swing.JTree groupAltruismTargetTree;
  public javax.swing.JLabel groupAltruismTitle;
  public javax.swing.JTree groupDetailsAscriptiveTree;
  public javax.swing.JButton groupDetailsConfirmCharacteristicButton;
  public javax.swing.JButton groupDetailsConfirmGroupButton;
  public javax.swing.JDialog groupDetailsDialog;
  public javax.swing.JTextPane groupDetailsGroupPane;
  public javax.swing.JPanel groupDetailsPanel;
  public javax.swing.JButton groupDetailsRemoveCharacteristicButton;
  public javax.swing.JButton groupDetailsResetGroupButton;
  public javax.swing.JTextField groupDetailsSelectedAscriptivePane;
  public javax.swing.JTextPane groupDetailsSelectedGroupPane;
  public javax.swing.JLabel jLabel1;
  public javax.swing.JLabel jLabel10;
  public javax.swing.JLabel jLabel11;
  public javax.swing.JLabel jLabel12;
  public javax.swing.JLabel jLabel13;
  public javax.swing.JLabel jLabel14;
  public javax.swing.JLabel jLabel15;
  public javax.swing.JLabel jLabel16;
  public javax.swing.JLabel jLabel17;
  public javax.swing.JLabel jLabel18;
  public javax.swing.JLabel jLabel19;
  public javax.swing.JLabel jLabel2;
  public javax.swing.JLabel jLabel20;
  public javax.swing.JLabel jLabel21;
  public javax.swing.JLabel jLabel3;
  public javax.swing.JLabel jLabel4;
  public javax.swing.JLabel jLabel5;
  public javax.swing.JLabel jLabel6;
  public javax.swing.JLabel jLabel7;
  public javax.swing.JLabel jLabel8;
  public javax.swing.JLabel jLabel9;
  public javax.swing.JPanel jPanel1;
  public javax.swing.JPanel jPanel2;
  public javax.swing.JPanel jPanel3;
  public javax.swing.JPanel jPanel4;
  public javax.swing.JScrollPane jScrollPane1;
  public javax.swing.JScrollPane jScrollPane10;
  public javax.swing.JScrollPane jScrollPane11;
  public javax.swing.JScrollPane jScrollPane12;
  public javax.swing.JScrollPane jScrollPane13;
  public javax.swing.JScrollPane jScrollPane2;
  public javax.swing.JScrollPane jScrollPane3;
  public javax.swing.JScrollPane jScrollPane4;
  public javax.swing.JScrollPane jScrollPane5;
  public javax.swing.JScrollPane jScrollPane6;
  public javax.swing.JScrollPane jScrollPane7;
  public javax.swing.JScrollPane jScrollPane8;
  public javax.swing.JScrollPane jScrollPane9;
  public javax.swing.JTabbedPane jTabbedPane1;
  public javax.swing.JTextField jTextField2;
  public javax.swing.JButton loadDataButton;
  public javax.swing.JButton nextCoalitionButton;
  public javax.swing.JButton nextYearButton;
  public javax.swing.JButton optionsButton;
  public javax.swing.JDialog optionsDialog;
  public javax.swing.JPanel optionsDialogPane;
  public javax.swing.JButton previousCoalitionButton;
  public javax.swing.JButton previousYearButton;
  public javax.swing.JButton setCoalitionRulesButton;
  public javax.swing.JButton viewAndChangeAltruismButton;
  public javax.swing.JButton viewAscriptiveTreeButton;
  public javax.swing.JButton viewGroupDetailsButton;
  public javax.swing.JTextField yAxisScaleInputText;
  public javax.swing.JButton yAxisScaleOKButton;
  // End of variables declaration
  // my variables
  private DragBarPanel theDragBarPanel = new DragBarPanel(4);

  /**
   * @return the altruismDialog
   */
  public javax.swing.JDialog getAltruismDialog()
  {
    return altruismDialog;
  }

  /**
   * @return the ascriptiveTree
   */
  public javax.swing.JTree getAscriptiveTree()
  {
    return ascriptiveTree;
  }

  /**
   * @return the ascriptiveTreeDialog
   */
  public javax.swing.JDialog getAscriptiveTreeDialog()
  {
    return ascriptiveTreeDialog;
  }

  /**
   * @return the coalitionCreationAscriptiveTree
   */
  public javax.swing.JTree getCoalitionCreationAscriptiveTree()
  {
    return coalitionCreationAscriptiveTree;
  }

  /**
   * @return the coalitionCreationCoalitionPane
   */
  public javax.swing.JTextPane getCoalitionCreationCoalitionPane()
  {
    return coalitionCreationCoalitionPane;
  }

  /**
   * @return the coalitionCreationDetailsPane
   */
  public javax.swing.JTextPane getCoalitionCreationDetailsPane()
  {
    return coalitionCreationDetailsPane;
  }

  /**
   * @return the coalitionCreationGroupPane
   */
  public javax.swing.JTextPane getCoalitionCreationGroupPane()
  {
    return coalitionCreationGroupPane;
  }

  /**
   * @return the coalitionCreationOthersPane
   */
  public javax.swing.JTextPane getCoalitionCreationOthersPane()
  {
    return coalitionCreationOthersPane;
  }

  /**
   * @return the coalitionCreationSelectedAscriptivePane
   */
  public javax.swing.JTextField getCoalitionCreationSelectedAscriptivePane()
  {
    return coalitionCreationSelectedAscriptivePane;
  }

  /**
   * @return the coalitionTextPane
   */
  public javax.swing.JTextPane getCoalitionTextPane()
  {
    return coalitionTextPane;
  }

  /**
   * @return the coalitionTree
   */
  public javax.swing.JTree getCoalitionTree()
  {
    return coalitionTree;
  }

  /**
   * @return the confirmAscriptiveButton
   */
  public javax.swing.JButton getConfirmAscriptiveButton()
  {
    return coalCreationConfirmCharacteristicButton;
  }

  /**
   * @return the confirmAscriptiveButton1
   */
  public javax.swing.JButton getConfirmAscriptiveButton1()
  {
    return groupDetailsConfirmCharacteristicButton;
  }

  /**
   * @return the confirmCoalitionButton
   */
  public javax.swing.JButton getConfirmCoalitionButton()
  {
    return coalCreationConfirmCoalitionButton;
  }

  /**
   * @return the confirmGroupButton
   */
  public javax.swing.JButton getConfirmGroupButton()
  {
    return coalCreationConfirmGroupButton;
  }

  /**
   * @return the confirmGroupButton1
   */
  public javax.swing.JButton getConfirmGroupButton1()
  {
    return groupDetailsConfirmGroupButton;
  }

  /**
   * @return the createCoalitionButton
   */
  public javax.swing.JButton getCreateCoalitionButton()
  {
    return createCoalitionButton;
  }

  /**
   * @return the createCoalitionDialog
   */
  public javax.swing.JDialog getCreateCoalitionDialog()
  {
    return createCoalitionDialog;
  }

  /**
   * @return the dataFileNameLabel
   */
  public javax.swing.JLabel getDataFileNameLabel()
  {
    return dataFileNameLabel;
  }

  /**
   * @return the dragBarContainer
   */
  public javax.swing.JPanel getDragBarContainer()
  {
    return dragBarContainer;
  }

  /**
   * @return the groupAltruismDoneButton
   */
  public javax.swing.JButton getGroupAltruismDoneButton()
  {
    return groupAltruismDoneButton;
  }

  /**
   * @return the groupAltruismResetButton
   */
  public javax.swing.JButton getGroupAltruismResetButton()
  {
    return groupAltruismResetButton;
  }

  /**
   * @return the groupAltruismSourceTree
   */
  public javax.swing.JTree getGroupAltruismSourceTree()
  {
    return groupAltruismSourceTree;
  }

  /**
   * @return the groupAltruismTargetTree
   */
  public javax.swing.JTree getGroupAltruismTargetTree()
  {
    return groupAltruismTargetTree;
  }

  /**
   * @return the groupAltruismTitle
   */
  public javax.swing.JLabel getGroupAltruismTitle()
  {
    return groupAltruismTitle;
  }

  /**
   * @return the groupDetailsAscriptiveTree
   */
  public javax.swing.JTree getGroupDetailsAscriptiveTree()
  {
    return groupDetailsAscriptiveTree;
  }

  /**
   * @return the groupDetailsDialog
   */
  public javax.swing.JDialog getGroupDetailsDialog()
  {
    return groupDetailsDialog;
  }

  /**
   * @return the jLabel1
   */
  public javax.swing.JLabel getJLabel1()
  {
    return jLabel1;
  }

  /**
   * @return the jLabel10
   */
  public javax.swing.JLabel getJLabel10()
  {
    return jLabel10;
  }

  /**
   * @return the jLabel11
   */
  public javax.swing.JLabel getJLabel11()
  {
    return jLabel11;
  }

  /**
   * @return the jLabel12
   */
  public javax.swing.JLabel getJLabel12()
  {
    return jLabel12;
  }

  /**
   * @return the jLabel13
   */
  public javax.swing.JLabel getJLabel13()
  {
    return jLabel13;
  }

  /**
   * @return the jLabel14
   */
  public javax.swing.JLabel getJLabel14()
  {
    return jLabel14;
  }

  /**
   * @return the jLabel15
   */
  public javax.swing.JLabel getJLabel15()
  {
    return jLabel15;
  }

  /**
   * @return the jLabel16
   */
  public javax.swing.JLabel getJLabel16()
  {
    return jLabel16;
  }

  /**
   * @return the jLabel17
   */
  public javax.swing.JLabel getJLabel17()
  {
    return jLabel17;
  }

  /**
   * @return the jLabel18
   */
  public javax.swing.JLabel getJLabel18()
  {
    return jLabel18;
  }

  /**
   * @return the jLabel2
   */
  public javax.swing.JLabel getJLabel2()
  {
    return jLabel2;
  }

  /**
   * @return the jLabel3
   */
  public javax.swing.JLabel getJLabel3()
  {
    return jLabel3;
  }

  /**
   * @return the jLabel4
   */
  public javax.swing.JLabel getJLabel4()
  {
    return jLabel4;
  }

  /**
   * @return the jLabel5
   */
  public javax.swing.JLabel getJLabel5()
  {
    return jLabel5;
  }

  /**
   * @return the jLabel6
   */
  public javax.swing.JLabel getJLabel6()
  {
    return jLabel6;
  }

  /**
   * @return the jLabel7
   */
  public javax.swing.JLabel getJLabel7()
  {
    return jLabel7;
  }

  /**
   * @return the jLabel8
   */
  public javax.swing.JLabel getJLabel8()
  {
    return jLabel8;
  }

  /**
   * @return the jLabel9
   */
  public javax.swing.JLabel getJLabel9()
  {
    return jLabel9;
  }

  /**
   * @return the jPanel1
   */
  public javax.swing.JPanel getJPanel1()
  {
    return jPanel1;
  }

  /**
   * @return the jScrollPane1
   */
  public javax.swing.JScrollPane getJScrollPane1()
  {
    return jScrollPane1;
  }

  /**
   * @return the jScrollPane10
   */
  public javax.swing.JScrollPane getJScrollPane10()
  {
    return jScrollPane10;
  }

  /**
   * @return the jScrollPane11
   */
  public javax.swing.JScrollPane getJScrollPane11()
  {
    return jScrollPane11;
  }

  /**
   * @return the jScrollPane12
   */
  public javax.swing.JScrollPane getJScrollPane12()
  {
    return jScrollPane12;
  }

  /**
   * @return the jScrollPane13
   */
  public javax.swing.JScrollPane getJScrollPane13()
  {
    return jScrollPane13;
  }

  /**
   * @return the jScrollPane2
   */
  public javax.swing.JScrollPane getJScrollPane2()
  {
    return jScrollPane2;
  }

  /**
   * @return the jScrollPane3
   */
  public javax.swing.JScrollPane getJScrollPane3()
  {
    return jScrollPane3;
  }

  /**
   * @return the jScrollPane4
   */
  public javax.swing.JScrollPane getJScrollPane4()
  {
    return jScrollPane4;
  }

  /**
   * @return the jScrollPane5
   */
  public javax.swing.JScrollPane getJScrollPane5()
  {
    return jScrollPane5;
  }

  /**
   * @return the jScrollPane6
   */
  public javax.swing.JScrollPane getJScrollPane6()
  {
    return jScrollPane6;
  }

  /**
   * @return the jScrollPane7
   */
  public javax.swing.JScrollPane getJScrollPane7()
  {
    return jScrollPane7;
  }

  /**
   * @return the jScrollPane8
   */
  public javax.swing.JScrollPane getJScrollPane8()
  {
    return jScrollPane8;
  }

  /**
   * @return the jScrollPane9
   */
  public javax.swing.JScrollPane getJScrollPane9()
  {
    return jScrollPane9;
  }

  /**
   * @return the jTabbedPane1
   */
  public javax.swing.JTabbedPane getJTabbedPane1()
  {
    return jTabbedPane1;
  }

  /**
   * @return the jTextField2
   */
  public javax.swing.JTextField getJTextField2()
  {
    return jTextField2;
  }

  /**
   * @return the jTextPane5
   */
  public javax.swing.JTextPane getJTextPane5()
  {
    return groupDetailsSelectedGroupPane;
  }

  /**
   * @return the jTextPane6
   */
  public javax.swing.JTextPane getJTextPane6()
  {
    return groupDetailsGroupPane;
  }

  /**
   * @return the loadDataButton
   */
  public javax.swing.JButton getLoadDataButton()
  {
    return loadDataButton;
  }

  /**
   * @return the nextCoalitionButton
   */
  public javax.swing.JButton getNextCoalitionButton()
  {
    return nextCoalitionButton;
  }

  /**
   * @return the nextConsequenceCoalitionButton
   */
  public javax.swing.JButton getNextConsequenceCoalitionButton()
  {
    return coalCreationNextCoalButton;
  }

  /**
   * @return the nextYearButton
   */
  public javax.swing.JButton getNextYearButton()
  {
    return nextYearButton;
  }

  /**
   * @return the optionsButton
   */
  public javax.swing.JButton getOptionsButton()
  {
    return optionsButton;
  }

  /**
   * @return the optionsDialog
   */
  public javax.swing.JDialog getOptionsDialog()
  {
    return optionsDialog;
  }

  /**
   * @return the optionsDialogPane
   */
  public javax.swing.JPanel getOptionsDialogPane()
  {
    return optionsDialogPane;
  }

  /**
   * @return the previousCoalitionButton
   */
  public javax.swing.JButton getPreviousCoalitionButton()
  {
    return previousCoalitionButton;
  }

  /**
   * @return the previousConsequenceCoalitionButton
   */
  public javax.swing.JButton getPreviousConsequenceCoalitionButton()
  {
    return coalCreationPrevCoalButton;
  }

  /**
   * @return the previousYearButton
   */
  public javax.swing.JButton getPreviousYearButton()
  {
    return previousYearButton;
  }

  /**
   * @return the removeAscriptiveButton
   */
  public javax.swing.JButton getRemoveAscriptiveButton()
  {
    return coalCreationRemoveCharacteristicButton;
  }

  /**
   * @return the removeAscriptiveButton1
   */
  public javax.swing.JButton getRemoveAscriptiveButton1()
  {
    return groupDetailsRemoveCharacteristicButton;
  }

  /**
   * @return the removeGroupButton
   */
  public javax.swing.JButton getRemoveGroupButton()
  {
    return coalCreationRemoveGroupButton;
  }

  /**
   * @return the resetCoalitionButton
   */
  public javax.swing.JButton getResetCoalitionButton()
  {
    return coalCreationResetCoalitionButton;
  }

  /**
   * @return the resetGroupButton
   */
  public javax.swing.JButton getResetGroupButton()
  {
    return coalCreationResetGroupButton;
  }

  /**
   * @return the resetGroupButton1
   */
  public javax.swing.JButton getResetGroupButton1()
  {
    return groupDetailsResetGroupButton;
  }

  /**
   * @return the setCoalitionRulesButton
   */
  public javax.swing.JButton getSetCoalitionRulesButton()
  {
    return setCoalitionRulesButton;
  }

  /**
   * @return the viewAndChangeAltruismButton
   */
  public javax.swing.JButton getViewAndChangeAltruismButton()
  {
    return viewAndChangeAltruismButton;
  }

  /**
   * @return the viewAscriptiveTreeButton
   */
  public javax.swing.JButton getViewAscriptiveTreeButton()
  {
    return viewAscriptiveTreeButton;
  }

  /**
   * @return the viewGroupDetailsButton
   */
  public javax.swing.JButton getViewGroupDetailsButton()
  {
    return viewGroupDetailsButton;
  }

  /**
   * @return the theDragBarPanel
   */
  public // End of variables declaration
          // my variables
          DragBarPanel getTheDragBarPanel()
  {
    return theDragBarPanel;
  }

  // Get methods
  // My methods
  public void setAllAscriptiveTrees(List<NamedArrayList<String>> ascriptives)
  {
    // all the roots
    DefaultMutableTreeNode tree1Root = (DefaultMutableTreeNode) ascriptiveTree.getModel().getRoot();
    DefaultMutableTreeNode tree2Root = (DefaultMutableTreeNode) coalitionCreationAscriptiveTree.getModel().getRoot();
    DefaultMutableTreeNode tree3Root = (DefaultMutableTreeNode) groupAltruismSourceTree.getModel().getRoot();
    DefaultMutableTreeNode tree4Root = (DefaultMutableTreeNode) groupAltruismTargetTree.getModel().getRoot();
    DefaultMutableTreeNode tree5Root = (DefaultMutableTreeNode) groupDetailsAscriptiveTree.getModel().getRoot();

    tree1Root.removeAllChildren();
    tree2Root.removeAllChildren();
    tree3Root.removeAllChildren();
    tree4Root.removeAllChildren();
    tree5Root.removeAllChildren();

    // iterate through the ascriptive categories
    for (int i = 0; i < ascriptives.size(); i++)
    {
      NamedArrayList ascriptiveCategory = ascriptives.get(i);
      DefaultMutableTreeNode ascriptiveCategoryNode1 = new DefaultMutableTreeNode(ascriptiveCategory.name);
      DefaultMutableTreeNode ascriptiveCategoryNode2 = new DefaultMutableTreeNode(ascriptiveCategory.name);
      DefaultMutableTreeNode ascriptiveCategoryNode3 = new DefaultMutableTreeNode(ascriptiveCategory.name);
      DefaultMutableTreeNode ascriptiveCategoryNode4 = new DefaultMutableTreeNode(ascriptiveCategory.name);
      DefaultMutableTreeNode ascriptiveCategoryNode5 = new DefaultMutableTreeNode(ascriptiveCategory.name);

      for (int j = 0; j < ascriptiveCategory.size(); j++)
      {
        //NamedArrayList categoryEntry = (NamedArrayList) ascriptiveCategory.get(j);
        //DefaultMutableTreeNode categoryEntryNode = new DefaultMutableTreeNode(categoryEntry.name);

        // If there is a hierarchy, we need to iterate and find it
        // NOTE: RIGHT NOW WE'RE NOT HANDLING ARBITRARY DEPTH HEIRARCHIES!!!!
      	/*
        if (categoryEntry.size() > 0)
        {
          int size = categoryEntry.size();
          for (int k = 0; k < size; k++)
          {
            categoryEntryNode.add(new DefaultMutableTreeNode(categoryEntry.get(k)));
          }
        }
        */

        ascriptiveCategoryNode1.add(new DefaultMutableTreeNode(ascriptiveCategory.get(j)));
        ascriptiveCategoryNode2.add(new DefaultMutableTreeNode(ascriptiveCategory.get(j)));
        ascriptiveCategoryNode3.add(new DefaultMutableTreeNode(ascriptiveCategory.get(j)));
        ascriptiveCategoryNode4.add(new DefaultMutableTreeNode(ascriptiveCategory.get(j)));
        ascriptiveCategoryNode5.add(new DefaultMutableTreeNode(ascriptiveCategory.get(j)));
      }

      tree1Root.add(ascriptiveCategoryNode1);
      tree2Root.add(ascriptiveCategoryNode2);
      tree3Root.add(ascriptiveCategoryNode3);
      tree4Root.add(ascriptiveCategoryNode4);
      tree5Root.add(ascriptiveCategoryNode5);
    }
    
    ascriptiveTree.updateUI();
    coalitionCreationAscriptiveTree.updateUI();
    groupAltruismSourceTree.updateUI();
    groupAltruismTargetTree.updateUI();
    groupDetailsAscriptiveTree.updateUI();
  }

  // makes it so items selected in certain trees are shown in the proper
  // text boxes
  public void setupGroupSelectionTreeListeners()
  {
    coalitionCreationAscriptiveTree.addTreeSelectionListener(new TreeSelectionListener()
    {

      public void valueChanged(TreeSelectionEvent e)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) coalitionCreationAscriptiveTree.getLastSelectedPathComponent();

        /* if nothing is selected */
        if (node == null)
        {
          return;
        }

        /* retrieve the node that was selected */
        Object nodeInfo = node.getUserObject();

        /* React to the node selection. */
        // create buttons if there are children.
        coalitionCreationSelectedAscriptivePane.setText((String) nodeInfo);
      }
    });

    groupDetailsAscriptiveTree.addTreeSelectionListener(new TreeSelectionListener()
    {

      public void valueChanged(TreeSelectionEvent e)
      {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) groupDetailsAscriptiveTree.getLastSelectedPathComponent();

        /* if nothing is selected */
        if (node == null)
        {
          return;
        }

        /* retrieve the node that was selected */
        Object nodeInfo = node.getUserObject();

        /* React to the node selection. */
        // create buttons if there are children.
        groupDetailsSelectedAscriptivePane.setText((String) nodeInfo);
      }
    });
  }

  public void setupGroupSelectionButtonListeners()
  {
    
  }
}












